
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>确认付款</title>
    <meta content="telephone=no,email=no,address=no" name="format-detection" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <meta name="msapplication-tap-highlight" content="no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="wap-font-scale" content="no" />
    <link rel="stylesheet" type="text/css" href="__CSS__pay/common.css?version={:config('version')}" />
    <link rel="stylesheet" type="text/css" href="__CSS__color.css?version={:config('version')}" />
    <link rel="stylesheet" type="text/css" href="__CSS__pay/confirm_order.css?version={:config('version')}" />

    <script type="text/javascript" src="__JS__jquery.js?v={:config('version')}"></script>
    <script type="text/javascript" src="__JS__jquery.form.js?v={:config('version')}"></script>
    <script type="text/javascript" src="__JS__common.js?v={:config('version')}"></script>
    <script type="text/javascript" src="__JS__base.js?v={:config('version')}"></script>
    <script type="text/javascript" src="__JS__layer/layer.js?v={:config('version')}"></script>

</head>
<body>
<div class="pay wrap4">
    <div class="pay-list">
        <dl class="white-bg radius10">
            <dt>订单号：<span id="order_num">{$order_num}</span></dt>
            <dd>{$data['0']['partner_name']}</dd>
            <dd>{$data['0']['p_name']}</dd>
            <!-- <dd>{$data['0']['p_name']}{if condition="$data['0']['p_is_fenqi'] == 1"}<b>账</b>{/if}</dd> -->
            <dd>¥{$data['0']['p_set_amount']}</dd>
            <dd class="text-right apply-btn">
                <!-- {if condition="$data['0']['p_is_fenqi'] == 1"}
                    <a class="orange-color" href="/user/mechanism">申请账单</a>
                {/if} -->
            </dd>
        </dl>
    </div>
    <!-- 目前静态数据 -->
    {if condition="$data['0']['is_show'] == 1"}
    <div class="wrap4 white-bg radius10">
        <div class="clearfix bottom-info">
            <div class="check fl">
                <input type="checkbox" id="checkbox" name="checkbox" class="p_insurance_price" price="{$data['0']['p_insurance_price']}" checked="" onchange=test(this)>
                <label class="label" for="checkbox"></label>
            </div>
            <label class="orange-color" for="checkbox">是否购买就业保险{if condition="$data['0']['p_insurance_fee'] == 2"}(机构赠送){/if}</label>
        </div>
        <div class="insurance-pirce">
            <span>保险费用：</span>
            <i class="orange-color">¥{$data['0']['p_insurance_price']}</i>
        </div>
        <div class="clearfix bottom-info bx_agreement" style="font-size:13px;padding-top:5px;line-height:1.5;">
            <span>我已阅读并同意</span> 
            <span>
                <a href="/pay/bx_agreement.html?type=1" style="color:#4760f1;">《投保须知》</a>
                <a href="/pay/bx_agreement.html?type=2" style="color:#4760f1;">《理赔须知》</a>
                <a href="/pay/bx_agreement.html?type=3" style="color:#4760f1;">《个人授权委托书》</a>
                <a href="/pay/bx_agreement.html?type=4" style="color:#4760f1;">《个人培训损失保险条款》</a>
                <a href="/pay/bx_agreement.html?type=5" style="color:#4760f1;">《附加考核延期达标保险条款》</a>
            </span>
        </div>
    </div>
    {/if}

    <footer>
        <div class="footer clearfix">
            <p class="price fl orange-color" id="price">
                <span class="fl">合计：¥</span>
                {if condition="$data['0']['p_open_insurance_service'] == 1  && $data['0']['p_report_insurance'] == 1"}
                <input type="number" class="fl orange-color" id="p_set_amount" value ="{$data['0']['p_set_amount']+$data['0']['p_insurance_price']}" p_insurance_price="{$data['0']['p_insurance_price']}" price ="{$data['0']['p_set_amount']}" {if condition="$data['0']['p_amount_fixed'] == 1"}readonly{/if} onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" onblur="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" />
                {else}
                <input type="number" class="fl orange-color" id="p_set_amount" value ="{$data['0']['p_set_amount']}" price ="{$data['0']['p_set_amount']}" {if condition="$data['0']['p_amount_fixed'] == 1"}readonly{/if} onkeyup="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" onblur="value=value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g,'')" />
                {/if}
                {if condition="$data['0']['p_amount_fixed'] == 0"}
                <i></i>
                {/if}
            </p>
            <button class="pay-btn fr" openid="{$openid}" p_id="{$data['0']['p_id']}" qrcode_id="{$qrcode_id}" id="confirmClick">确认提交</button>
        </div>
    </footer>
</div>
</body>
</html>

<script type="text/javascript" src="__JS__pay/confirm_order.js?v={:config('version')}"></script>
{include file="footer" /}

<script type="text/javascript">
    $("#price input").focus(function(){
        $(this).siblings("i").hide();
    })
    $("#price input").blur(function(){
        $(this).siblings("i").show();
    })

</script>
<script>
    function test(chk){
        var p_insurance_price = $(".p_insurance_price").attr("price");
        var p_set_amount = $("#p_set_amount").attr("price");

        //根据是否购买课程计算合计金额
        if(chk.checked == false){
            $(".insurance-pirce").hide();
            $(".bx_agreement").hide();
            $("#p_set_amount").val(parseFloat(p_set_amount));
        }else{
            $(".insurance-pirce").show();
            $(".bx_agreement").show();
            $("#p_set_amount").val(parseFloat(p_set_amount)+parseFloat(p_insurance_price));
        }
    }
</script>
